package com.obj;

public class Point {
	private double x;
	private double y;
	
	Point()
	{
		
	}
	
	Point(double x,double y)
	{
		this.x = x;
		this.y = y;
	}
	
	public double Distance(Point p)
	{
		double result = (x-p.x)*(x-p.x) + (y-p.y)*(y-p.y);
		double L = Math.sqrt(result);
		return L;
	}
	
	public void SetX(double x)
	{
		this.x = x;
	}
	
	public double GetX()
	{
		return this.x;
	}
	
	public void SetY(double y)
	{
		this.y = y;
	}
	
	public double GetY()
	{
		return this.y;
	}
	
	public void info()
	{
		System.out.println("this point: x = "+x+";y = "+y);
	}
	
}

class Circle
{
	private Point o;
	private double radius;
	
	Circle(double radius)
	{
		this.o = new Point(0,0);
		this.radius = radius;
	}
	
	Circle(Point o,double radius)
	{
		this.o = o;
		this.radius = radius;
	}
	
	boolean Contains(Point p)
	{
		double x = p.GetX();
		double L = (p.GetX() - o.GetX())*(p.GetX() - o.GetX())
				+ (p.GetY() - o.GetY())*(p.GetY() - o.GetY());
		return L > (this.radius*this.radius)?false:true;
	}
	
	public void SetRadius(double radius)
	{
		this.radius = radius;
	}
	
	public void GetRadius()
	{
		System.out.println("radius = "+radius);
	}
	
	public void SetPoint(Point o)
	{
//		this.o.SetX(x);
//		this.o.SetY(y);
		this.o = o;
	}
	
	public void GetPoint()
	{
		this.o.info();
	}
	
}
